<div id="content">
    <section widget-grid id="widget-grid">
        <div class="row">
            <article class="col-sm-12">
                <div id="todo-widget" jarvis-widget data-widget-editbutton="false" data-widget-color="blue">
                    <header>
                        <span class="widget-icon"> <i class="fa fa-table"></i> </span>
                        <h2>(总数: {{totalNumber}})</h2>
                        <div class="widget-toolbar">
                            <button class="btn btn-xs btn-col-fff" ng-class="{active: newTodo}" data-toggle="modal"
                                    data-target="#addMainMenu">
                                <i ng-class="{ 'fa fa-plus': !newTodo, 'fa fa-times': newTodo}"></i> 新增菜单
                            </button>
                        </div>
                    </header>
                    <div class="widget-body tab-content">
                        <div class="form-inline">
                            <div class="table-scroll">
                                <table class="table table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <td class="text-center">菜单名称</td>
                                        <td class="text-center">勾选菜单</td>
                                        <td class="text-center">前端路由</td>
                                        <td class="text-center">icon</td>
                                        <td class="text-center">操作</td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="text-center" ng-repeat="item in list"
                                        ng-class="{{item.parentId ? item.parentId+'child':''}}">
                                        <td>{{item.title}}</td>
                                        <td>{{item.checked}}</td>
                                        <td>{{item.route}}</td>
                                        <td>{{item.icon}}</td>
                                        <td>操作</td>
                                    </tr>
                                    </tbody>
                                </table>

                            </div>
                        </div>
                    </div>
                </div>
            </article>
        </div>
    </section>

    <!--新增弹出框-->
    <div class="modal fade" id="addMainMenu" tabindex="-1" role="dialog" aria-labelledby="addMainMenuAccount"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="addMainMenuAccount">新增菜单</h4>
                </div>
                <div class="modal-body">
                    <div class="client-form ng-pristine">
                        <div class="row">
                            <label class="col-sm-2 col-xs-12  input-label text-left">菜单名称</label>
                            <div class="col-sm-10 col-xs-12 form-group">
                                <input type="text" class="form-control" placeholder="请输入"
                                       ng-model="addMainMenuObj.title">
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-sm-2 col-xs-12  input-label text-left">前端路由</label>
                            <div class="col-sm-10 col-xs-12 form-group">
                                <input type="text" class="form-control" placeholder="请输入"
                                       ng-model="addMainMenuObj.route">
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-sm-2 col-xs-12  input-label text-left">icon</label>
                            <div class="col-sm-10 col-xs-12 form-group">
                                <input type="text" class="form-control" placeholder="请输入"
                                       ng-model="addMainMenuObj.icon">
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-2 col-xs-12  input-label text-left">排序</label>
                            <div class="col-sm-10 col-xs-12 form-group">
                                <input type="text" class="form-control" placeholder="请输入"
                                       ng-model="addMainMenuObj.sort">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-2 col-xs-12  input-label text-left">勾选菜单</div>
                            <div class="col-sm-10 col-xs-12">
                                <label class="radio-inline  input-label" ng-repeat="item in checkedOption">
                                    <input type="radio" name="addMainMenuObj" class="radiobox" value="{{item.value}}"
                                           ng-checked="item.value == addMainMenuObj.checked"
                                           ng-model="addMainMenuObj.checked">
                                    <span>{{item.name}}</span>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        取消
                    </button>
                    <button type="button" class="btn btn-primary" ng-click="addMainMenu()"
                            ng-disabled="!addMainMenuObj.title || !addMainMenuObj.icon || !addMainMenuObj.route">
                        确定
                    </button>
                </div>
            </div>
        </div>
    </div>


</div>